package com.indusfo.spc.client.mapper;

import com.indusfo.spc.pojo.Batch;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author chenm
 * @create 2019-12-06 13:27
 */
public interface ClientBatchMapper {

  /**
   * 查询任务单的投产数量
   */
  int commissioning(@Param("orderId") Integer orderId);

  /**
   * 查询任务单的完工数量
   */
  int finished(@Param("orderId") Integer orderId,@Param("batchId")Integer batchId);

  Batch selectByBatchCode(@Param("batchCode") String batchCode);

  List<Batch> selectByOrderId(@Param("selectByOrderId") Integer selectByOrderId);

  int insertBatch(Batch batch);

  List<Integer> selectByOderId(@Param("selectByOrderId")Integer selectByOrderId);
  
  int updateBatch(Batch batch);

  Batch selectByBatchId(@Param("batchId") Integer batchId);
}
